package com.sne.monitor.entity;

import com.sne.common.annotation.Dict;
import com.sne.common.entity.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
 * 定时任务
 * @author fanghh
 * @date 2020/12/7
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "MonitorTimeTaskt对象", description = "定时任务")
public class MonitorTimeTask extends BaseModel<MonitorTimeTask> {

    @ApiModelProperty(value = "任务名称")
    @NotBlank(message = "任务名称不为空")
    private String taskName;

    @ApiModelProperty(value = "任务分组")
    @Dict(value = "TIME_TASK_GROUP")
    private String taskGroup;

    @ApiModelProperty(value = "调用方法")
    @NotBlank(message = "调用方法不为空")
    private String taskFun;

    @ApiModelProperty(value = "cron表达式")
    @NotBlank(message = "cron表达式不为空")
    private String cron;

    @ApiModelProperty(value = "是否并发")
    private Boolean concurrence;

    @ApiModelProperty(value = "错误策略")
    private String stragtery;

    @ApiModelProperty(value = "状态")
    private Boolean state;

}
